<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>显示隐藏元素之visibility</title>
    <style>
      .baba {
        /* 隐藏元素，会保留元素原来的位置 */
        visibility: hidden;
        width: 200px;
        height: 200px;
        background-color: pink;
      }
      .mama {
        width: 200px;
        height: 200px;
        background-color: skyblue;
      }
    </style>
  </head>
  <body>
    <div class="baba">猪爸爸</div>
    <div class="mama">猪妈妈</div>
  </body>
</html>
